<template>
  <couponList v-if="showStatus==1" @setShowStatus="setShowStatus"></couponList>
  <couponForm v-else="showStatus==2" @setShowStatus="setShowStatus"></couponForm>
</template>

<script lang="ts">
export default {
  name: "Coupon",
};
</script>

<script lang="ts" setup>
import couponList from "./components/couponList.vue";
import couponForm from "./components/couponForm.vue";
import type { CouponInfoModel, CouponInfoListModel } from "@/api/model/couponModel";
import { ref } from "vue";

//定义显示哪个组件的标识
const showStatus=ref<number>(1);
//用来修改显示与隐藏标识的方法
const setShowStatus=(val:number)=>{
  showStatus.value=val
}
</script>

<style scoped></style>
